# -*- coding: utf-8 -*-
# -文件说明-
# @Time    : 2019/11/25 11:12
# @Author  : hwx
# @Email   : @163.com
# @File    : urls.py
# @Software: PyCharm
from django.urls import path

from . import views
app_name = 'polls'      # 增加命名空间
urlpatterns = [
    # ex: /polls/
    path('', views.index, name='index'),
    path('son1', views.son1, name='index'),     # name属性的值只是为了识别以及后续使用url函数识别，真正起作用的是views.son1
    path('son2', views.index, name='son2'),     # name属性的值只是为了识别以及后续使用url函数识别，真正起作用的是views.index
    path('son1/sun1', views.sun1, name='sun1'),
    path('son1/sun2', views.sun2, name='sun2'),
    path('index1', views.index1, name='index1'),
    path('index2', views.index2, name='index2'),
    # ex: /polls/5/
    path('<int:question_id>/', views.detail, name='detail'),
    # ex: /polls/5/results/
    path('<int:question_id>/results/', views.results, name='results'),
    # ex: /polls/5/vote/
    path('<int:question_id>/vote/', views.vote, name='vote'),
]